<?php
//和ajaxeq.html配套的
header("content-type:text/html;charset=utf-8");
$pdo=new PDO("mysql:host=127.0.0.1;dbname=news","root","keyan");
$pdo->query("set names utf8");
$sql=$_POST['sql'];
$pdos = $pdo->query($sql);
$arr = $pdos->fetchAll(PDO::FETCH_ASSOC);
echo "<pre>";
print_r($arr);
echo "</pre>";
